From: Juanma Barranquero Date: Fri, 14 Jun 2002 09:41:20 +0000 (+0000) Subject: (comint-snapshot-last-prompt): Bind `inhibit-read-only' to t to support X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~32228 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=6aa6125dfc027f627594afcdd97a703859b4cf49;p=emacs.git (comint-snapshot-last-prompt): Bind `inhibit-read-only' to t to support read-only prompts. (comint-output-filter): Likewise. --- diff --git a/lisp/comint.el b/lisp/comint.el index ea06ab4ac5f..6840e4d6c5a 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1535,9 +1535,10 @@ either globally or locally.") ;; prompt overlay. (defun comint-snapshot-last-prompt () (when comint-last-prompt-overlay - (add-text-properties (overlay-start comint-last-prompt-overlay) - (overlay-end comint-last-prompt-overlay) - (overlay-properties comint-last-prompt-overlay)))) + (let ((inhibit-read-only t)) + (add-text-properties (overlay-start comint-last-prompt-overlay) + (overlay-end comint-last-prompt-overlay) + (overlay-properties comint-last-prompt-overlay))))) (defun comint-carriage-motion (string) "Handle carriage control characters in comint output. @@ -1661,10 +1662,11 @@ This function should be in the list `comint-output-filter-functions'." (set-marker (process-mark process) (point)) (unless comint-use-prompt-regexp-instead-of-fields - (add-text-properties comint-last-output-start (point) - '(rear-nonsticky t - field output - inhibit-line-move-field-capture t))) + (let ((inhibit-read-only t)) + (add-text-properties comint-last-output-start (point) + '(rear-nonsticky t + field output + inhibit-line-move-field-capture t)))) ;; Highlight the prompt, where we define `prompt' to mean ;; the most recent output that doesn't end with a newline.